"""
API 专用fixture
"""
import pytest
from utils.request_util import RequestUtil


@pytest.fixture(scope="session")
def api_client():
    """创建全局API客户端"""
    client = RequestUtil()

    # 可在此添加全局认证
    # client.session.headers["Authorization"] = "Bearer token"

    yield client

    # 测试结束后清理
    client.session.close()


